#!/bin/bash

# make sure symbolic links for all shared objects are generated
CUR_DIR=$PWD

LIB_DIR=./dependencies/libs

cd $LIB_DIR

rm -f libfreeimage.so
rm -f libfreeimage.so.3
rm -f libphysfs.so
rm -f libsfml-audio.so
rm -f libsfml-graphics.so
rm -f libsfml-window.so
rm -f libsfml-system.so
rm -f libsfml-network.so

ln -s libfreeimage-3.15.1.so libfreeimage.so
ln -s libfreeimage-3.15.1.so libfreeimage.so.3
ln -s libphysfs.so.2.0.2 libphysfs.so
ln -s libsfml-audio.so.1.6 libsfml-audio.so
ln -s libsfml-graphics.so.1.6 libsfml-graphics.so
ln -s libsfml-window.so.1.6 libsfml-window.so
ln -s libsfml-system.so.1.6 libsfml-system.so
ln -s libsfml-network.so.1.6 libsfml-network.so

cd $CUR_DIR

#generate eclipse workspace
cmake -G "Eclipse CDT4 - Unix Makefiles"